pdf("figure2.pdf", width = 7, height = 8)

#use layout
layout(cbind(c(1,1),c(2,2),c(3,3)), widths = c(2,4,4))
#layout.show(3)
#1st column
par(mar = c(0,0,0,0))
plot(0,0, xlim = c(-4, 4), ylim = c(-27,11), axes = F,
    xlab = "", ylab = "", type = "n")
center.height <- 7.5
text(0, center.height, "Configuration 1\n(Both aligned)", font = 2, cex = 1.5, adj = .5)
text(0, center.height-3, "Predicted\ncounter-judge\neffect: none", cex = 1.5, adj = .5, font =3)

center.height <- -2.5
text(0, center.height, "Configuration 2\n(SC aligned)", font = 2, cex = 1.5, adj = .5)
text(0, center.height-3, "Predicted\ncounter-judge\neffect: small", cex = 1.5, adj = .5, font =3)

center.height <- -11.5
text(0, center.height, "Configuration 3\n(Circuit aligned)", font = 2, cex = 1.5, adj = .5)
text(0, center.height-3, "Predicted\ncounter-judge\neffect: moderate", cex = 1.5, adj = .5, font =3)

center.height <- -21.5
text(0, center.height, "Configuration 4\n(Both opposed)", font = 2, cex = 1.5, adj = .5)
text(0, center.height-3, "Predicted\ncounter-judge\neffect: largest", cex = 1.5, adj = .5, font =3)


#2nd column: unified panels

plot(0,0, xlim = c(-4, 9), ylim = c(-27,11), axes = F,
    xlab = "", ylab = "", type = "n")
#First, "Control Units" or Unified Panels
text(2,11, "Unified panels\n(no counter-judge)", font = 2, cex = 1.5)
#configuration 1
center.height <- 6 
arrows(-3.5,center.height + 2.5,8, center.height + 2.5, code = 3, length = .1)
arrows(-3.5,center.height,8, center.height, code = 3, length = .1)
arrows(-3.5,center.height-2.5,8, center.height-2.5, code = 3, length = .1)
segments(-1,center.height-2, -1, center.height-3)
segments(-1,center.height-.5, -1, center.height+.5)
segments(-1,center.height+2, -1, center.height+3)
text(-1, center.height-3.5, expression(paste(bolditalic(J[1]), 
  bolditalic(" & "), paste(bolditalic(J[2]), bolditalic(" & "), paste(bolditalic(J[3]))))))
text(-1, center.height-1, expression(bolditalic(Cir)))
text(-1, center.height+1.5, expression(bolditalic(SC)))
#segments(6,center.height-2, 6, center.height-3)
#text(6, center.height-3.5, expression(paste(bolditalic(J[3]))))

#configuration 2
center.height <- -4
arrows(-3.5,center.height + 2.5,8, center.height + 2.5, code = 3, length = .1)
arrows(-3.5,center.height,8, center.height, code = 3, length = .1)
arrows(-3.5,center.height-2.5,8, center.height-2.5, code = 3, length = .1)
segments(-1,center.height-2, -1, center.height-3)
segments(6,center.height-.5, 6, center.height+.5)
segments(-1,center.height+2, -1, center.height+3)
text(-1, center.height-3.5, expression(paste(bolditalic(J[1]), 
  bolditalic(" & "), paste(bolditalic(J[2]), bolditalic(" & "), paste(bolditalic(J[3]))))))
text(6, center.height-1, expression(bolditalic(Cir)))
text(-1, center.height+1.5, expression(bolditalic(SC)))
#segments(6,center.height-2, 6, center.height-3)
#text(6, center.height-3.5, expression(paste(bolditalic(J[3]))))


#configuration 3
center.height <- -14
arrows(-3.5,center.height + 2.5,8, center.height + 2.5, code = 3, length = .1)
arrows(-3.5,center.height,8, center.height, code = 3, length = .1)
arrows(-3.5,center.height-2.5,8, center.height-2.5, code = 3, length = .1)
segments(-1,center.height-2, -1, center.height-3)
segments(-1,center.height-.5, -1, center.height+.5)
segments(6,center.height+2, 6, center.height+3)
text(-1, center.height-3.5, expression(paste(bolditalic(J[1]), 
  bolditalic(" & "), paste(bolditalic(J[2]), bolditalic(" & "), paste(bolditalic(J[3]))))))
text(-1, center.height-1, expression(bolditalic(Cir)))
text(6, center.height+1.5, expression(bolditalic(SC)))
#segments(6,center.height-2, 6, center.height-3)
#text(6, center.height-3.5, expression(paste(bolditalic(J[3]))))

#configuration 4
center.height <- -24
arrows(-3.5,center.height + 2.5,8, center.height + 2.5, code = 3, length = .1)
arrows(-3.5,center.height,8, center.height, code = 3, length = .1)
arrows(-3.5,center.height-2.5,8, center.height-2.5, code = 3, length = .1)
segments(-1,center.height-2, -1, center.height-3)
segments(6,center.height-.5, 6, center.height+.5)
segments(6,center.height+2, 6, center.height+3)
text(-1, center.height-3.5, expression(paste(bolditalic(J[1]), 
  bolditalic(" & "), paste(bolditalic(J[2]), bolditalic(" & "), paste(bolditalic(J[3]))))))
text(6, center.height-1, expression(bolditalic(Cir)))
text(6, center.height+1.5, expression(bolditalic(SC)))
#segments(6,center.height-2, 6, center.height-3)
#text(6, center.height-3.5, expression(paste(bolditalic(J[3]))))


#xxxxxxxxxxxxxxxxxxxxxxxxxx
#xxxxxxxxxxxxxxxxxxxxxxxxxx
#xxxxxxxxxxxxxxxxxxxxxxxxxx
#3rd column: Mixed Panels
    
plot(0,0, xlim = c(13, 26), ylim = c(-27,11), axes = F,
    xlab = "", ylab = "", type = "n")
text(19,11, "Mixed panels\n(counter-judge)", font = 2, cex = 1.5)
#configuration 1
center.height <- 6
arrows(13,center.height + 2.5,24, center.height + 2.5, code = 3, length = .1)
arrows(13,center.height,24, center.height, code = 3, length = .1)
arrows(13,center.height-2.5,24, center.height-2.5, code = 3, length = .1)
segments(15,center.height-2, 15, center.height-3)
segments(15,center.height-.5, 15, center.height+.5)
segments(15,center.height+2, 15, center.height+3)
text(15, center.height-3.5, expression(paste(bolditalic(J[1]), bolditalic(" & "), paste(bolditalic(J[2])))))
text(15, center.height-1, expression(bolditalic(Cir)))
text(15, center.height+1.5, expression(bolditalic(SC)))
segments(22,center.height-2, 22,center.height-3)
text(22, center.height-3.5, expression(paste(bolditalic(J[3]))))

#configuration 2
center.height <- -4
arrows(13,center.height + 2.5,24, center.height + 2.5, code = 3, length = .1)
arrows(13,center.height,24, center.height, code = 3, length = .1)
arrows(13,center.height-2.5,24, center.height-2.5, code = 3, length = .1)
segments(15,center.height-2, 15, center.height-3)
segments(22,center.height-.5, 22, center.height+.5)
segments(15,center.height+2, 15, center.height+3)
text(15, center.height-3.5, expression(paste(bolditalic(J[1]), bolditalic(" & "), paste(bolditalic(J[2])))))
text(22, center.height-1, expression(bolditalic(Cir)))
text(15, center.height+1.5, expression(bolditalic(SC)))
segments(22,center.height-2, 22, center.height-3)
text(22, center.height-3.5, expression(paste(bolditalic(J[3]))))


#configuration 3
center.height <- -14
arrows(13,center.height + 2.5,24, center.height + 2.5, code = 3, length = .1)
arrows(13,center.height,24, center.height, code = 3, length = .1)
arrows(13,center.height-2.5,24, center.height-2.5, code = 3, length = .1)
segments(15,center.height-2, 15, center.height-3)
segments(15,center.height-.5, 15, center.height+.5)
segments(22,center.height+2, 22, center.height+3)
text(15, center.height-3.5, expression(paste(bolditalic(J[1]), bolditalic(" & "), paste(bolditalic(J[2])))))
text(15, center.height-1, expression(bolditalic(Cir)))
text(22, center.height+1.5, expression(bolditalic(SC)))
segments(22,center.height-2, 22, center.height-3)
text(22, center.height-3.5, expression(paste(bolditalic(J[3]))))

#configuration 4
center.height <- -24
arrows(13,center.height + 2.5,24, center.height + 2.5, code = 3, length = .1)
arrows(13,center.height,24, center.height, code = 3, length = .1)
arrows(13,center.height-2.5,24, center.height-2.5, code = 3, length = .1)
segments(15,center.height-2, 15, center.height-3)
segments(22,center.height-.5, 22, center.height+.5)
segments(22,center.height+2, 22, center.height+3)
text(15, center.height-3.5, expression(paste(bolditalic(J[1]), bolditalic(" & "), paste(bolditalic(J[2])))))
text(22, center.height-1, expression(bolditalic(Cir)))
text(22, center.height+1.5, expression(bolditalic(SC)))
segments(22,center.height-2, 22, center.height-3)
text(22, center.height-3.5, expression(paste(bolditalic(J[3]))))

dev.off()
